From 382153e82d1066fdf232ddbe1562b9432b724f0c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 1 Jun 2020 00:09:52 -0400 Subject: [PATCH] gtk-demo: Fix keynav in the puzzle We need to make shortcut controller have global scope, otherwise the shortcuts lose against the window keybindings. --- demos/gtk-demo/sliding_puzzle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demos/gtk-demo/sliding_puzzle.c b/demos/gtk-demo/sliding_puzzle.c index 3f1a7c3092..925d981764 100644 --- a/demos/gtk-demo/sliding_puzzle.c +++ b/demos/gtk-demo/sliding_puzzle.c @@ -293,6 +293,8 @@ start_puzzle (GdkPaintable *paintable) /* Add shortcuts so people can use the arrow * keys to move the puzzle */ controller = gtk_shortcut_controller_new (); + gtk_shortcut_controller_set_scope (GTK_SHORTCUT_CONTROLLER (controller), + GTK_SHORTCUT_SCOPE_GLOBAL); add_move_binding (GTK_SHORTCUT_CONTROLLER (controller), GDK_KEY_Left, GDK_KEY_KP_Left, -1, 0); -- 2.30.2